  {% include file="index.header.tpl.php" %}
  {% include file="index.left.tpl.php" %}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form action="" method="GET">	
                <div class="box-header with-border">
                    <span class="fa fa-pencil" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">班主任经验交流修改</p>	
                </div>
                <div class="box-body">
                      <div class="form-group">
							  <label for="inputPassword3" class="col-md-1 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
								   年级：
							  </label>
							  <div class="input-group col-md-5 col-sm-12 col-xs-12">
								   <select class="form-control" name="grade_fid" id="grade_id">
								   {%foreach from=$grade_lists key=key item=value%}
										<option value="{%$value.grade_id%}"{%if $manage_data.grade_id==$value.grade_id%}selected{%/if%}> {%$val	ue.grade_name%}</option>
								   {%/foreach%}
									
								    </select>
							  </div> 
				        </div>
						<div class="form-group">
							  <label for="inputPassword3" class="col-md-1 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
								    班级：
							  </label>
							  <div class="input-group col-md-5 col-sm-12 col-xs-12">
								   <select class="form-control" name="class_id" id="class_id">
								   {%foreach from=$class_lists key=key item=value%}
										<option value="{%$value.class_id%}"{%if $manage_data.class_id==$value.class_id%}selected{%/if%}> {%$value.class_name%}</option>
									{%/foreach%}
								
								    </select>
							  </div> 
				        </div>
				</form>
				<form action="" method="post">
						<div class="form-group">
							  <label for="inputPassword3" class="col-md-1 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
								   标题：
							  </label>
							  <div class="input-group col-md-5 col-sm-12 col-xs-12">
								    <input type="text" class="form-control" name="manage_title" value="{%$manage_data.manage_title%}" >
							  </div> 
				        </div>
						<div class="form-group">
							  <label for="inputPassword3" class="col-md-1 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
								   附件：
							  </label>
							  <div class="input-group col-md-5 col-sm-12 col-xs-12">
								   <input type="file" value="" multiple> 
							  </div> 
						</div>
				   </div><!--box-body -->
				   <div class="box-footer text-center">
				         <button type="submit" class="btn btn-primary"> 保 存 </button>
				   </div>
               </form>
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
  {% include file="index.footer.tpl.php" %}
  <!--二级联动-->
  <script type="text/javascript">
        $(document).ready(function () {

            $("#grade_id").change(function () {		

                if ($(this).val() == "-1") {
					$("#industr").remove(); return; 
					}
                else {
			var timestamp = new Date().getTime();
			$.ajax({
			url:"http://schoolplat.wangyunw.com/public/index.php?a=exchange.listjson",
			type:"get",
			data: "grade_id=" + $("#grade_id").find("option:selected").val() + "&timestamp=" + timestamp,
			dataType:"json",
			success:function(msg){
			   
                            //实例2个字符串变量来拼接下拉列表
                            var industr = "";
                            //使用jquery解析json中的数据
                            $.each(msg, function (n, value) {
                                industr += ("<option value=\"" + value.class_id + "\">" + value.class_name);
                                industr += ("</option>");
                            });

                            $("#class_id").html(industr);			   			   
			}
			});					

                }

            });

        });
</script>
